<!doctype html>
<html>
<head>
    <title>Neovis.js Simple Example</title>
    <style type="text/css">
        html, body {
            font: 16pt arial;
        }

        #viz {
            width: 900px;
            height: 700px;
            border: 1px solid lightgray;
            font: 22pt arial;
        }

    </style>

    <!-- FIXME: load from dist -->
    <script type="text/javascript" src="../dist/neovis.js"></script>


    <script
            src="https://code.jquery.com/jquery-3.2.1.min.js"
            integrity="sha256-hwg4gsxgFZhOsEEamdOYGBf13FyQuiTwlAQgxVSNgt4="
            crossorigin="anonymous"></script>

    <script type="text/javascript">
		// define config car
		// instantiate nodevis object
		// draw

		var viz;

		async function easyFunction() {
			return (await fetch("http://localhost:8080/data")).json();
		}

		async function* iterableFunction() {
			const allIds = await (await fetch("http://localhost:8080/allIds")).json();
			for(const id of allIds) {
				yield *(await (await fetch(`http://localhost:8080/data/${id}`)).json());
			}
		}

		const data = [{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},{"identity":{"low":0,"high":0},"start":{"low":0,"high":0},"end":{"low":1,"high":0},"type":"INTERACTS","properties":{"wight":{"low":1,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},{"start":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"end":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"segments":[{"start":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"relationship":{"identity":{"low":0,"high":0},"start":{"low":0,"high":0},"end":{"low":1,"high":0},"type":"INTERACTS","properties":{"wight":{"low":1,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"end":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},{"identity":{"low":1,"high":0},"start":{"low":1,"high":0},"end":{"low":0,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},{"start":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"end":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"segments":[{"start":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"relationship":{"identity":{"low":1,"high":0},"start":{"low":1,"high":0},"end":{"low":0,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"end":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"identity":{"low":2,"high":0},"start":{"low":2,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:2","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"start":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"segments":[{"start":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"relationship":{"identity":{"low":2,"high":0},"start":{"low":2,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:2","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"identity":{"low":3,"high":0},"start":{"low":3,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:3","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"start":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"segments":[{"start":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"relationship":{"identity":{"low":3,"high":0},"start":{"low":3,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:3","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"identity":{"low":4,"high":0},"start":{"low":2,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:4","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"start":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"segments":[{"start":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"relationship":{"identity":{"low":4,"high":0},"start":{"low":2,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:4","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"identity":{"low":5,"high":0},"start":{"low":3,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:5","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"start":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"segments":[{"start":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"relationship":{"identity":{"low":5,"high":0},"start":{"low":3,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:5","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},{"identity":{"low":6,"high":0},"start":{"low":0,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:6","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"start":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"segments":[{"start":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"relationship":{"identity":{"low":6,"high":0},"start":{"low":0,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:6","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},{"identity":{"low":7,"high":0},"start":{"low":1,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:7","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},{"start":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"segments":[{"start":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"relationship":{"identity":{"low":7,"high":0},"start":{"low":1,"high":0},"end":{"low":2,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:7","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"},"end":{"identity":{"low":2,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:2"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},{"identity":{"low":8,"high":0},"start":{"low":0,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:8","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"start":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"segments":[{"start":{"identity":{"low":0,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":10,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12","pagerank":"test2"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0"},"relationship":{"identity":{"low":8,"high":0},"start":{"low":0,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:8","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:0","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}},{"keys":["n","r","m","a"],"length":4,"_fields":[{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},{"identity":{"low":9,"high":0},"start":{"low":1,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:9","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},{"start":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"segments":[{"start":{"identity":{"low":1,"high":0},"labels":["Character"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"size":{"low":100,"high":0},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"pagerank":"test","community":"tew1"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1"},"relationship":{"identity":{"low":9,"high":0},"start":{"low":1,"high":0},"end":{"low":3,"high":0},"type":"INTERACTS","properties":{"wight":{"low":2,"high":0}},"elementId":"5:def89b3f-243a-4376-88e7-ceafa6f48c7a:9","startNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:1","endNodeElementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"},"end":{"identity":{"low":3,"high":0},"labels":["Character2"],"properties":{"test2":{"year":{"low":2023,"high":0},"month":{"low":5,"high":0},"day":{"low":11,"high":0}},"test":[{"low":1,"high":0},{"low":2,"high":0},{"low":3,"high":0},{"low":4,"high":0}],"community":"tew12"},"elementId":"4:def89b3f-243a-4376-88e7-ceafa6f48c7a:3"}}],"length":1}],"_fieldLookup":{"n":0,"r":1,"m":2,"a":3}}];
		function syncDataFunction() {
			return data;
		}

		function *syncGeneratorData() {
			for(const d of data) {
				yield d;
			}
		}

		function getRandomInt(max) {
  			return Math.floor(Math.random() * max);
		}

		const avialibleFunctions = [easyFunction, syncDataFunction, syncGeneratorData, iterableFunction];

		function draw() {
			var config = {
				containerId: "viz",
				consoleDebug: true,
				labels: {
					Character: {
						label: "name",
						value: "pagerank",
						group: "community",
						[NeoVis.NEOVIS_ADVANCED_CONFIG]: {
							function: {
								title: NeoVis.objectToTitleHtml
							},
						}
					}
				},
				relationships: {
					INTERACTS: {
						value: "weight",
						[NeoVis.NEOVIS_ADVANCED_CONFIG]: {
							function: {
								title: NeoVis.objectToTitleHtml
							},
						}
					}
				},
				dataFunction: avialibleFunctions[getRandomInt(avialibleFunctions.length)]
			};

			viz = new NeoVis.default(config);
			viz.render();
			console.log(viz);

		}
    </script>
</head>
<body onload="draw()">
<div id="viz"></div>


Cypher query: <textarea rows="4" cols=50 id="cypher"></textarea><br>
<input type="submit" value="Submit" id="reload">
<input type="submit" value="Stabilize" id="stabilize">


</body>

<script>
	$("#reload").click(function () {

		var cypher = $("#cypher").val();

		if (cypher.length > 3) {
			viz.renderWithCypher(cypher);
		} else {
			console.log("reload");
			viz.reload();

		}

	});

	$("#stabilize").click(function () {
		viz.stabilize();
	})

</script>
</html>